package com.ylc.test;

import com.ylc.proxy4.AOP.LogAOP;
import com.ylc.proxy4.AOP.TransAOP;
import com.ylc.proxy4.Agent;
import com.ylc.proxy4.Service.ProductServiceImpl;
import com.ylc.proxy4.Service.Service;
import org.junit.Test;

/**
 * @Author: ylc
 * @Description: 使用静态代理分离业务和切面。
 * @Date Created in 2022-07-18 15:20
 */
public class MyTest04 {
    @Test
    public void test04(){
        Service agent = new Agent(new ProductServiceImpl(),new TransAOP());
        agent.buy();
    }
}
